/**
* @author Ashish Gupta
* CVSSP, University of Surrey
* Copyright (c) 2010 Ashish Gupta
* All rights reserved.
*/
/**
 * 
 */
package projFn;

import java.util.ArrayList;
import java.util.Random;

/**
 * @author Ashish
 *
 */
public class ProjFn {
	private ArrayList<Integer> projFn = new ArrayList<Integer>();
	private Double fitness = 0.0;
	
	public ProjFn(int maxHashCode){
		this.projFn = new ArrayList<Integer>(maxHashCode);
	}
	
	public ProjFn(int maxHashCode, int numBins){
		Random rnd = new Random();
		for(int i = 0;i < maxHashCode; i++){
			this.projFn.add(rnd.nextInt(numBins)+1);
		}
	}

	/**
	 * @param projFn the projFn to set
	 */
	public void setProjFn(ArrayList<Integer> projFn) {
		this.projFn = projFn;
	}

	/**
	 * @return the projFn
	 */
	public ArrayList<Integer> getProjFn() {
		return projFn;
	}

	/**
	 * @param fitness the fitness to set
	 */
	public void setFitness(Double fitness) {
		this.fitness = fitness;
	}

	/**
	 * @return the fitness
	 */
	public Double getFitness() {
		return fitness;
	}
}
